<template>
	<view class="tips">
		<rich-text v-if="nodes" :nodes="nodes"></rich-text>
	</view>
</template>

<script setup>
	import {ref, onMounted} from 'vue'
	import {UserModel} from '@/service/model/user.js'
	
	import parseHtml from '@/utils/strChangeNode.js'
	
	const userModel = new UserModel()
	
	const nodes=ref()
	
	const props = defineProps({
		color:{
			type:String
		},
		id:{
			type:String
		}
	})
	
	const getSystemDocFun=async()=>{
		const {data,success}=await userModel.getSystemDoc({},props.id || '0')
		if(success){
			nodes.value = parseHtml(data?.content)
		}
	}
	
	onMounted(()=>{
		getSystemDocFun()
	})
	
</script>

<style lang="less" scoped>
.tips{
	padding: 0 20rpx;
	font-size: 26rpx;
	color: v-bind(color);
	.text_indent{
		text-indent: 2em;
	}
}
</style>